package cn.copera.dyy.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import cn.copera.dyy.common.persistence.IdEntity;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 店面用户信息
 * 
 * @author Administrator
 * 
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "ka_user_shop")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class UserShop extends IdEntity<UserShop> {
	private String openid;// 用户关注OPENID
	private Shop shop;
	private Integer pointPraiseCount;// 点赞次数
	private Integer shareCount;//分享次数
	private Integer use_point;//可用点数
	private Integer day_praise_count;//每天已点赞数
	private String praise_time;//点赞日期
	private Date operate;//最近足迹时间
	private Integer day_share_count;//每天已分享数
	private String share_time;//分享日期
	private Integer countPoint;//总共赠送的卡点
	private Date check_time;//系统自动认领点赞时间
	private Date check_time1;//系统自动认领分享时间	

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "shop_id")
	@NotFound(action = NotFoundAction.IGNORE)
	@JsonIgnore
	public Shop getShop() {
		return shop;
	}

	public void setShop(Shop shop) {
		this.shop = shop;
	}

	public Integer getPointPraiseCount() {
		return pointPraiseCount;
	}

	public void setPointPraiseCount(Integer pointPraiseCount) {
		this.pointPraiseCount = pointPraiseCount;
	}

	public Integer getShareCount() {
		return shareCount;
	}

	public void setShareCount(Integer shareCount) {
		this.shareCount = shareCount;
	}

	public Integer getUse_point() {
		return use_point;
	}

	public void setUse_point(Integer use_point) {
		this.use_point = use_point;
	}

	public Integer getDay_praise_count() {
		return day_praise_count;
	}

	public void setDay_praise_count(Integer day_praise_count) {
		this.day_praise_count = day_praise_count;
	}

	public String getPraise_time() {
		return praise_time;
	}

	public void setPraise_time(String praise_time) {
		this.praise_time = praise_time;
	}

	public Date getOperate() {
		return operate;
	}

	public void setOperate(Date operate) {
		this.operate = operate;
	}

	public Integer getDay_share_count() {
		return day_share_count;
	}

	public void setDay_share_count(Integer day_share_count) {
		this.day_share_count = day_share_count;
	}

	public String getShare_time() {
		return share_time;
	}

	public void setShare_time(String share_time) {
		this.share_time = share_time;
	}

	public Integer getCountPoint() {
		return countPoint;
	}

	public void setCountPoint(Integer countPoint) {
		this.countPoint = countPoint;
	}

	public Date getCheck_time() {
		return check_time;
	}

	public void setCheck_time(Date check_time) {
		this.check_time = check_time;
	}

	public Date getCheck_time1() {
		return check_time1;
	}

	public void setCheck_time1(Date check_time1) {
		this.check_time1 = check_time1;
	}

	

}
